import { fileURLToPath,URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  base:'/',
  plugins: [vue()],
  server: {
    open:true, //1. 启动成功后自动打开浏览器
    host:'127.0.0.1',
    port:5173
  },
  resolve: {
    alias: {
      //2. 配置`@`指向`src`目录
      '@': fileURLToPath(new URL('./src',import.meta.url)) 
    }
  }
})
